package com.bleem.ds.xinshou.a01;

/**
 * @author SuYanchun
 * @since 2024-08-05 下午3:44
 */
public class PrintBinary {

    private static void print(int num){
        for (int i = 31; i >= 0; i--) {
            System.out.print((num & (1 << i)) == 0 ? "0" : "1");
        }
        System.out.println();
    }

    public static void main(String[] args) {
        print(20);
        print(56);
    }
}
